package com.kfm.base.loop2;

public class Demo06 {

    public static void main(String[] args) {
        /*
            最小公倍数
         */
        int num = 37;
        int num1 = 7;

        // num 大， num1 小
        if (num < num1){
            // 换位置
            num = num ^ num1;
            num1 = num ^ num1;
            num = num ^ num1;
        }


        for (int i = 2; i <= num; i ++){
            int result = num1 * i;
            if (result % num == 0){
                System.out.println("最小公倍数：" + result);
                break;
            }
        }
    }
}
